/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #e3f2fd 0%, #90caf9 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: row;
}

/* 侧边导航栏样式 */
.navbar {
    background: white;
    color: #1976d2;
    width: 240px;
    height: 100vh;
    padding: 20px 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.logo {
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    padding: 0 20px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.logo i {
    margin-right: 10px;
    font-size: 24px;
}

.nav-links {
    display: flex;
    flex-direction: column;
    padding: 20px 0;
}

.nav-links a {
    color: #1976d2;
    text-decoration: none;
    padding: 12px 20px;
    font-weight: 500;
    font-size: 16px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.nav-links a i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

.nav-links a:hover {
    color: #0d47a1;
    background-color: #e3f2fd;
    transform: translateX(5px);
}

.nav-links a.active {
    color: #0d47a1;
    font-weight: 600;
    background-color: #e3f2fd;
    position: relative;
}

.nav-links a.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: #1976d2;
    border-radius: 0 2px 2px 0;
}

/* 容器样式 */
.container {
    max-width: 100%; /* 增加最大宽度以适应更大屏幕 */
    margin: 30px 30px 30px 270px; /* 增加左侧边距以适应侧边栏 */
    padding: 0 20px;
    width: calc(100% - 270px); /* 计算剩余宽度 */
}
/* 卡片样式 */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.card-header {
    background: linear-gradient(45deg, #1976d2, #64b5f6);
    color: white;
    padding: 15px 20px;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.card-header i {
    margin-right: 10px;
}

.card-body {
    padding: 20px;
}

/* 网格布局 */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

/* 网格布局 */
.grid1 {
    display: grid;/* 2列布局 */
    grid-template-columns: 1fr 1fr;
    /* 上下间距 */
    gap: 20px;

}

/* 信息行样式 */
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.info-row:last-child {
    border-bottom: none;
}

.info-row strong {
    color: #555;
}

.info-row span {
    color: #333;
}

/* 复制按钮 */
.copy-btn {
    background: #e3f2fd;
    color: #1976d2;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.copy-btn i {
    margin-right: 5px;
}

.copy-btn:hover {
    background: #bbdefb;
    transform: translateY(-2px);
}

/* 图表容器 */
.chart-container {
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
}

.chart {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.chart svg {
    transform: rotate(-90deg);
}

.chart .bg {
    fill: none;
    stroke: #f0f0f0;
    stroke-width: 10;
}

.chart .value {
    fill: none;
    stroke: #1976d2;
    stroke-width: 10;
    stroke-linecap: round;
    transition: all 1s ease;
}

.chart-text {
    position: absolute;
    font-size: 18px;
    font-weight: bold;
    color: #1976d2;
    margin-top: 60px;
}

/* 告警卡片 */
.alarm-card .card-body {
    padding: 0;
}

.alarm-image {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.alarm-image img {
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.alarm-info {
    padding: 20px;
}

/* 日志卡片自适应优化 */
.log-card .card-body {
    max-height: calc(100vh - 150px);
    overflow-y: auto;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .navbar {
        width: 200px; 
    }
    .container,
    .main-content {
        margin-left: 200px;
        width: calc(100% - 200px);
    }
}
#log-container {
    font-family: monospace;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    list-style-type: none;
}

/* 日志级别样式 */
.log-debug {
    color: #6c757d;
}

.log-info {
    color: #0d6efd;
}

.log-warn {
    color: #ffc107;
    font-weight: 500;
}

.log-error {
    color: #dc3545;
    font-weight: 600;
}

.log-fatal {
    color: #721c24;
    background-color: #f8d7da;
    padding: 2px 5px;
    border-radius: 3px;
    font-weight: 700;
}

/* 日志过滤器 */
.log-filter {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.log-filter button {
    background: #e3f2fd;
    color: #1976d2;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.log-filter button:hover {
    background: #bbdefb;
}

.log-filter button.active {
    background: #1976d2;
    color: white;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    border-color: #1976d2;
    outline: none;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.2);
}

.btn-primary {
    background: linear-gradient(45deg, #1976d2, #64b5f6);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 12px 25px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-primary i {
    margin-right: 8px;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #0d47a1, #42a5f5);
    transform: translateY(-2px);
}

.status-message {
    margin-top: 20px;
    padding: 12px 15px;
    border-radius: 6px;
    font-weight: 500;
}

.success {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.error {
    background-color: #ffebee;
    color: #c62828;
}

@media (max-width: 1024px) {
    .container {
        max-width: 900px;
    }
}

@media (max-width: 768px) {
    .navbar {
        width: 60px;
    }

    .logo span, .nav-links a span {
        display: none;
    }

    .logo i {
        margin-right: 0;
    }

    .nav-links a i {
        margin-right: 0;
    }

    .container {
        margin-left: 90px;
        width: calc(100% - 90px);
    }

    .grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .navbar {
        width: 100%;
        height: auto;
        position: relative;
        flex-direction: row;
        padding: 10px;
    }

    .logo {
        padding: 0 10px;
        border-bottom: none;
    }

    .nav-links {
        flex-direction: row;
        padding: 0;
    }

    .nav-links a {
        padding: 10px;
    }

    .container {
        margin: 20px 15px;
        width: calc(100% - 30px);
    }

    .card-header {
        font-size: 16px;
    }

    .alarm-image img {
        height: auto;
        max-width: 100%;
    }
}
.info-row {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  white-space: nowrap; /* 防止换行 */
  overflow: hidden;
}

.info-row span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis; /* 显示省略号 */
  white-space: nowrap;
}

.copy-btn {
  margin-left: 10px;
  flex-shrink: 0; /* 防止按钮被压缩 */
}
/* 主内容区样式 */
.main-content {
    width: 100%;
    margin-left: 240px; /* 与侧边栏宽度一致 */
    padding: 0;
}
